package com.fdd.op.sdk.request.api.contract;

import com.fdd.op.sdk.ApiRuleException;
import com.fdd.op.sdk.BaseFddRequest;
import com.fdd.op.sdk.constants.Constants;
import com.fdd.op.sdk.internal.mapping.RequestField;
import com.fdd.op.sdk.internal.util.StringUtils;
import com.fdd.op.sdk.response.api.contract.CheckSignatureResponse;
import com.fdd.op.sdk.response.api.contract.DocSignImageResponse;

import java.util.Map;

public class DocSignImageRequest extends BaseFddRequest<DocSignImageResponse> {
    @Override
    public String getApiMethodName() {
        return "/base/api/contract/getDocSignImage";
    }

    @Override
    public Map<String, Object> getTextParams() {
        return null;
    }

    @Override
    public Class<DocSignImageResponse> getResponseClass() {
        return DocSignImageResponse.class;
    }

    @Override
    public void check() throws ApiRuleException {
        if(StringUtils.isBlank(getDocId())){
            throw new ApiRuleException("33030", "文档在在电子签系统的docId不允许为空！");
        }
    }

    @Override
    public String getHttpMethod() {
        return Constants.METHOD_GET;
    }

    @RequestField
    private String docId;

    @RequestField
    private String personId;

    public String getDocId() {
        return docId;
    }

    public void setDocId(String docId) {
        this.docId = docId;
    }

    public String getPersonId() {
        return personId;
    }

    public void setPersonId(String personId) {
        this.personId = personId;
    }
}
